package rpc.frame.order;

import org.springframework.beans.factory.annotation.Autowired;
import rpc.frame.OrderService;
import rpc.frame.core.annotation.RpcServer;
import rpc.frame.server.config.RpcServerConfiguration;

import javax.annotation.Resource;


@RpcServer(interfaceClass = OrderService.class)
public class OrderServiceImpl implements OrderService {

    @Resource
    private RpcServerConfiguration serverConfiguration;

    @Override
    public String getOrder(String orderId, String userName) {
        return serverConfiguration.getServerPort() +"---"+serverConfiguration.getRpcPort()+"---Congratulations, The RPC call succeeded,orderId is "+orderId +",userName is " +userName;
    }
}
